Check for nil as a binding in previous commit
authorjustbur <justin@burkett.cc>
Thu, 19 Nov 2015 03:04:29 +0000 (22:04 -0500)
committerjustbur <justin@burkett.cc>
Thu, 19 Nov 2015 03:04:29 +0000 (22:04 -0500)
which-key.el

index aaef402b4593835f779deb2197f4bb488607b118..7347fad37236a71c8907071c8565b58846348728 100644 (file)
@@ -1124,8 +1124,9 @@ An empty stiring is returned if no title exists."
              (res (assoc key-lst alist))
              (mode-alist (assq major-mode alist))
              (mode-res (when mode-alist (assoc key-lst mode-alist)))
-             (alternate (when (symbolp (key-binding (apply #'vector key-lst)))
-                          (symbol-name (key-binding (apply #'vector key-lst))))))
+             (binding (key-binding (apply #'vector key-lst)))
+             (alternate (when (and binding (symbolp binding))
+                          (symbol-name binding))))
         (cond (mode-res (cdr mode-res))
               (res (cdr res))
               ((and (eq which-key-show-prefix 'echo) alternate)